package com.woniuxy.order.receive;

import com.rabbitmq.client.Channel;
import com.woniuxy.order.entity.RenthouseOrder;
import com.woniuxy.order.service.RenthouseOrderService;
import org.springframework.amqp.core.Message;
import org.springframework.beans.factory.annotation.Autowired;

import java.io.IOException;

public class MQReceive {
    @Autowired
    RenthouseOrderService renthouseOrderService;
//    @RabbitListener(queues = "orderQueue")
    public void renthouseOrder(RenthouseOrder order, Channel channel, Message message) throws IOException {

        channel.basicAck(message.getMessageProperties().getDeliveryTag(),false);

    }
}
